<?php
/**
 * Created by PhpStorm.
 * User: david
 * Date: 4/6/19
 * Time: 6:56 PM
 */
use Faker\Generator as Faker;

$factory->define(App\Models\Batch::class, function (Faker $faker) {
    $time = \Carbon\Carbon::now()->addHours(mt_rand(1, 10000))->timestamp;
    $group = ['A', 'B', 'C', 'D', 'E'];
    $group_s = $group[mt_rand(0, 4)];
    $name = date('YmdHi', $time).$group_s;
    return [
        'name' => $name,
        'time' => $time,
        'batch_date' => date('Y-m-d', $time),
        'batch_datetime' => date('Y-m-d H:i', $time),
        'group' => $group_s,
        'type' => [1, 2, 3][mt_rand(0, 2)],
    ];
});